﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/UserUI/User.Master" AutoEventWireup="true" CodeBehind="ProductEntry.aspx.cs" Inherits="BoutiquePOS.UI.UserUI.ProductEntry" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../../Styles/UserUI/DivStyle.css" rel="stylesheet" type="text/css" />
    
    <link href="../../Styles/UserUI/style.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/UserUI/GridView.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">

        function check() {
            if (document.getElementById('<% = productIdTxtBox.ClientID %>').value == "") {
                alert("Enter a cabin no.");
            }
            var agree = confirm("Are you sure you want to delete this Information?");
            if (agree)
                return true;
            else
                return false;
        }
        function validation() {
            if (document.getElementById('<% =productNameTxtBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Product name cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =productNameTxtBox.ClientID %>').focus();
                return false;
            }
            if (document.getElementById('<% =tradePriceTxtBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Trade price cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =tradePriceTxtBox.ClientID %>').focus();
                return false;
            }
            if (document.getElementById('<% =flatPriceTxtBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Flat price cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =flatPriceTxtBox.ClientID %>').focus();
                return false;
            }
            if (document.getElementById('<% =vatTxtBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Vat amount cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =vatTxtBox.ClientID %>').focus();
                return false;
            }
            if (document.getElementById('<% =mrpTxtBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Mrp amount cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =mrpTxtBox.ClientID %>').focus();
                return false;
            }
            if (document.getElementById('<% =discountPerTxtBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Discount Percentage cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =discountPerTxtBox.ClientID %>').focus();
                return false;
            }
            if (document.getElementById('<% =packSizeTxtBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Pack size cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =packSizeTxtBox.ClientID %>').focus();
                return false;
            }
            if (document.getElementById('<% =reOrderQtyTxtBox.ClientID %>').value == "") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Re-order quantity cannot be blank ";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                document.getElementById('<% =reOrderQtyTxtBox.ClientID %>').focus();
                return false;
            }

            if (document.getElementById('<% =genderSelect.ClientID %>').value == "--Select--") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Select a Generic Name";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                return false;
            }
            if (document.getElementById('<% =categoryNameSelect.ClientID %>').value == "--Select--") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Select a Therapeutic Name";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                return false;
            }
            if (document.getElementById('<% =ageGroupSelect.ClientID %>').value == "--Select--") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Select a Form Name";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                return false;
            }
            if (document.getElementById('<% =categorySizeSelect.ClientID %>').value == "--Select--") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Select a Group Name";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                return false;
            }
            if (document.getElementById('<% =productSeasonSelect.ClientID %>').value == "--Select--") {
                document.getElementById('<%=messageResult.ClientID %>').textContent = "Select a Company Name";
                document.getElementById('<%=messageResult.ClientID%>').style.color = "red";
                return false;
            }
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fieldset>
        <legend style="color: blue">|| Product Info Entry ||</legend>
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Product Id</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="productIdTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Product Brand Name</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="productNameTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>Gender Name</label>
                    </div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="genderSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Category Name</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="categoryNameSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Age Group</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="ageGroupSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Category Size</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="categorySizeSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Product Season</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="productSeasonSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Made In Country</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="countrySelect" runat="server"></select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Trade Price</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="tradePriceTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Flat Price</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="flatPriceTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        VAT</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="vatTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        MRP</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="mrpTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Discount Percentage</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="discountPerTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        PackSize</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="packSizeTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Re-Order Quantity</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="reOrderQtyTxtBox" runat="server" /></div>
            </div>
        </div>
        <br />
        
       <%-- <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Create By</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="createByTextBox" runat="server" /></div>
            </div>
        </div>
        <br />--%>

        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Create Date</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="text" id="createDateTextBox" runat="server" /></div>
            </div>
        </div>

        <%--<div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Company Name</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="companySelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Unit Name</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="unitSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Store Name</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="storeSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Rack Name</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="rackSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Shelf Name</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="shelfSelect" runat="server">
                        <option></option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <label>
                        Payment Mode</label></div>
            </div>
            <div class="divColumn">
                <div>
                    <select id="paymentModeSelect" runat="server">
                        <option>--Select--</option>
                        <option value="0">Cash</option>
                        <option value="1">Credit</option>
                    </select>
                </div>
            </div>
        </div>
        <br />
        <br />--%>
        <div class="divRow">
            <div class="divColumn">
                <div>
                    <p id="messageResult" runat="server">
                    </p>
                </div>
            </div>
            <div class="divColumn">
                <div>
                    <input type="submit" value="Save" id="saveButton" runat="server" onserverclick="SaveProduct"
                        class="myButton" onclick="javascript:return validation()" />&nbsp;
                    <input type="submit" value="Clear" id="clearButton" runat="server" onserverclick="ClearButton"
                        class="myButton" />&nbsp;
                    <input type="submit" value="Close" id="closeButton" runat="server" onserverclick="CloseButton"
                        class="myButton" />&nbsp;
                    <input type="submit" value="Delete" id="deleteButton" runat="server" onserverclick="DeleteButton"
                        class="myButton" onclick="javascript:return check()" />
                </div>
            </div>
        </div>
    </fieldset>
</asp:Content>

